<template>

  <el-card :id="jobInfo_id" class="box-card" style="cursor:pointer" @click="goto_detail">
    <el-row>

      <el-col :span="1"><div class="grid-content "></div></el-col>
      <el-col :span="20"><div class="grid-content ">
        <div class="box-header-style">
          <el-row>
            <el-col :span="18">
              <p class="title-style">{{title}}</p>
            </el-col>
            <el-col :span="6">
              <p class="money-style">{{money}}</p>
            </el-col>
          </el-row>
        </div>
        <el-divider style="margin: 10px"></el-divider>
        <p class="text-style">{{content}}
          <el-divider direction="vertical"></el-divider>{{experience}}
          <el-divider direction="vertical"></el-divider>{{education}}</p>
      </div></el-col>
    </el-row>
    <div class="info">
      <p>{{author}}</p>
      <p>·</p>
      <p>{{times}}</p>
    </div>
  </el-card>
</template>

<script>
export default {
  name: 'Hcard',
  data(){
    return{
      // title:"标题",
      // content:"这是内容",
      //experience:"经验",
      //education:"学历"
      // author:"作者",
      // times:"时间",
      // img_src:require('@/assets/test1.jpg'),
    }
  },
  props:["title","content","author","times","img_src","experience","education","money","jobInfo_id"],
  methods:{
    goto_detail(){
      if (localStorage.getItem('Token')) {2
        sessionStorage.setItem("YHauthor",this.author)
        sessionStorage.setItem("YHJobInfo_id",this.jobInfo_id)
        sessionStorage.setItem("YHJob_title",this.title)
        sessionStorage.setItem("YHJob_money",this.money)
        sessionStorage.setItem("YHJob_content",this.content)
        sessionStorage.setItem("YHJob_experience",this.experience)
        sessionStorage.setItem("YHJob_education",this.education)
        //this.$router.push('/DetailJobInfo')
        window.open("http://localhost:8088/DetailJobInfo/index")
      } else {
        this.$router.push('/weblogin')
      }
    },
  }
}
</script>

<style scoped>

.box-card{
  height: 125px;
  border-style:solid;
  border-width:4px;
  border-color: #ffffff;
}
.box-header-style{
  margin: 0;
}
.title-style{
  margin: 0;
  font-family:"微软雅黑";
  font-size: 18px;
}
.money-style{
  margin: 0;
  font-family:"黑体";
  font-size: 16px;
  color: #fc771d;
}
.info p{
  float: left;
  margin: 0px;
}
.info{
  position: relative;
  padding-top: 3px;
  left: 18px;
  margin: 0px;
  font-size: 12px;
  color: #787878;
}
.text-style{
  color: #a8a8a8;
  margin: 0;
  font-family:"微软雅黑";
  font-size: 13px;
  width: 100%;
  height: 30px;
}
.box-card:Hover {
  border-color: #A5D6A7;
}
</style>
